<template>
  <el-container class="main_con">
    <div class="filter_con ds_block"></div>
    <div class="list_con">
      <el-table @selection-change="SelectHadnle" :data="list" element-loading-text fit highlight-current-row class="main-loading">
        <el-table-column prop="id" label="ID" width="100px"></el-table-column>
        <el-table-column prop="admin_name" label="操作员"></el-table-column>
        <el-table-column prop="ip" label="操作IP"></el-table-column>
        <el-table-column prop="ip" label="操作类型">
          <template slot-scope="scope">
            <span>{{ scope.row.title }}</span>
            <span style="margin-left: 10px;">{{ scope.row.action }}</span>
          </template>
        </el-table-column>
        <el-table-column label="操作时间" prop="create_time"></el-table-column>
        <!--    <el-table-column label="操作" width="280px">
          <template slot-scope="scope">
            <el-button v-has style="margin-left: 10px;" type="text" >编辑</el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <div class="table_footer">
        <!--  <el-button size="medium">批量删除
        </el-button>-->
        <el-pagination
          @current-change="ChangeCurrent"
          class="pages"
          background
          layout="prev, pager, next"
          :total="total"
          :page-size="params.size"
          :page-count="params.page"
          hide-on-single-page
        ></el-pagination>
      </div>
    </div>
    <!-- <el-drawer class="w_80" title="编辑管理员" :visible.sync="drawer" :direction="direction">
      <edituser @on-close="beClose" :uid='user_id' :user_type="user_type"></edituser>
    </el-drawer>-->
    <el-dialog title="直播间分享码" :visible.sync="showQrcode" width="500px" class="dialog_box">
      <div class="u-flex" style="width:100%;justify-content: center;"><img style="width: 200px;" :src="Qrcode" /></div>
    </el-dialog>
  </el-container>
</template>

<script>
import {getLogList} from '@/api/mall/log';
import {fitter_keyword} from '@/utils/index';
export default {
  data() {
    return {
      params: {
        status: '',
        page: 1,
        size: 10
      },
      total: 0,
      listLoading: true,
      list: []
    };
  },
  mounted() {
    this.getlist();
  },

  methods: {
    //获取列表
    getlist() {
      this.listLoading = true;
      let data = fitter_keyword(this.params);
      getLogList(data).then(res => {
        console.log(res);
        var jsondata = res.msg;
        this.list = jsondata.data;
        this.total = jsondata.total;
        // this.list = response.data.items
        this.listLoading = false;
      });
    },

    //切换页码
    ChangeCurrent(page) {
      this.params.page = page;
      this.getlist();
    }
  }
};
</script>

<style lang="scss" scoped></style>
